package com.liziba.trend.feign;

import com.liziba.trend.api.IndexData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @program: trend
 * @description: feign client
 * @author: liziba
 * @date: 2021-02-03 12:05
 */
@FeignClient(value = "index-data-service", fallback = IndexDataClientFeignHystrix.class)
public interface IndexDataClient {

    @GetMapping("/indexData/data/{code}")
    List<IndexData> getIndexCode(@PathVariable(value = "code") String code);
}
